<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Form</title>
    <style>
      form {
        max-width: 500px;
        margin: auto;
        padding: 20px;
        border: 2px solid gray;
        border-radius: 5px;
        font-family: Arial, sans-serif;
      }
      label {
        display: block;
        margin-bottom: 10px;
        font-weight: bold;
      }
      input[type="text"],
      input[type="number"] {
        width: 100%;
        padding: 10px;
        border-radius: 3px;
        border: 1px solid #ccc;
        box-sizing: border-box;
        margin-bottom: 20px;
        font-size: 16px;
      }
      select {
        width: 100%;
        padding: 10px;
        border-radius: 3px;
        border: 1px solid #ccc;
        box-sizing: border-box;
        margin-bottom: 20px;
        font-size: 16px;
      }
      input[type="submit"] {
        background-color: #4CAF50;
        color: white;
        padding: 12px 20px;
        border: none;
        border-radius: 4px;
        cursor: pointer;
      }
      input[type="submit"]:hover {
        background-color: #45a049;
      }
    </style>
  </head>
  <body>
    <form action="{:url('banners/update')}" method="post" enctype="multipart/form-data">
      <label for="name">Name:</label>
      <input type="text" id="name" name="name" value="{$banners.name}" required>
        <input type="hidden" id="id" name="id" value="{$banners.id}" >
      <label for="slug">Slug:</label>
      <input type="text" id="slug" name="slug" value="{$banners.slug}" required>

      <!-- <label for="image">Image:</label>
      <input type="text" id="image" name="image" value="{$banners.image}" required> -->
      <label for="order">Image上传图片:</label>
      <input type="file" name="image" /> 
      
      <label for="order">Order:</label>
      <input type="number" id="order" name="order"  value="{$banners.order}" required>

      <label for="status">Status:</label>
      <select id="status" name="status">
        <option value="1" {if $banners.status eq 1} selected {/if}>启用</option>
        <option value="-1">禁用</option>
      </select>

      <!-- <label for="created_at">Created At:</label>
      <input type="text" id="created_at" name="created_at" required>

      <label for="created_uid">Created UID:</label>
      <input type="text" id="created_uid" name="created_uid" required> -->

      <input type="submit" value="Submit">
    </form>
  </body>
</html>